home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / source / contrib / supported / feynmf / feynmp.sty < prev    next >
Text File  |  1995-03-15  |  9KB  |  226 lines

  1. %% 
  2. %% This is file `feynmp.sty', generated 
  3. %% on <1995/3/4> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% feynmf.dtx  (with options: `style,mp')
  8. %% 
  9. %% Copyright (C) 1989, 1990, 1992-1995 by Thorsten.Ohl@Physik.TH-Darmstadt.de 
  10. %% 
  11. %% This file is NOT the source for feynmf, because almost all comments 
  12. %% have been stripped from it. It is NOT the preferred form of feynmf 
  13. %% for making modifications to it. 
  14. %% 
  15. %% Therefore you can NOT redistribute and/or modify THIS file. You can 
  16. %% however redistribute the complete source (feynmf.dtx and feynmf.ins) 
  17. %% and/or modify it under the terms of the GNU General Public License as 
  18. %% published by the Free Software Foundation; either version 2, or (at 
  19. %% your option) any later version. 
  20. %% 
  21. %% Feynmf is distributed in the hope that it will be useful, but 
  22. %% WITHOUT ANY WARRANTY; without even the implied warranty of 
  23. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
  24. %% GNU General Public License for more details. 
  25. %% 
  26. %% You should have received a copy of the GNU General Public License 
  27. %% along with this program; if not, write to the Free Software 
  28. %% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  29. %% 
  30. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  31. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  32. %% \CheckSum{553}
  33. %% \CharacterTable
  34. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  35. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  36. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  37. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  38. %%   Dollar        \$     Percent       \%     Ampersand     \&
  39. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  40. %%   Asterisk      \*     Plus          \+     Comma         \,
  41. %%   Minus         \-     Point         \.     Solidus       \/
  42. %%   Colon         \:     Semicolon     \;     Less than     \<
  43. %%   Equals        \=     Greater than  \>     Question mark \?
  44. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  45. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  46. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  47. %%   Right brace   \}     Tilde         \~}
  48. %%
  49. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  50. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  51. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  52. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  53. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  54. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  55. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  56. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  57. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  58. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  59. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  60. \NeedsTeXFormat{LaTeX2e}
  61. {\def\RCS#1#2\endRCS{%
  62.   \ifx$#1%
  63.     \@RCS $#2 \endRCS
  64.   \else
  65.     \@RCS $*: #1#2$ \endRCS
  66.   \fi}%
  67.  \def\@RCS $#1: #2,v #3 #4 #5 #6$ \endRCS{%
  68.    \gdef\filename{#2}%
  69.    \gdef\fileversion{v#3}%
  70.    \gdef\filedate{#4}%
  71.    \gdef\docdate{#4}}%
  72. \RCS feynmf.dtx,v 1.10 1995/02/18 16:42:18 ohl Exp \endRCS}%
  73. \ProvidesPackage{feynmp}[\filedate\space LaTeX2e package]
  74. \typeout{Package: `feynmp'
  75.    \fileversion\space <\filedate> (tho) PRELIMINARY TEST RELEASE}
  76. \wlog{English documentation \@spaces<\docdate> (tho)}
  77. \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{graphicx}}
  78. \ProcessOptions
  79. \RequirePackage{graphicx}
  80. \let\mdqrestore\relax
  81. \@ifundefined{mdqoff}{}{%
  82.   \mdqoff
  83.   \let\mdqrestore\mdqon}
  84. \newwrite\@outfmf
  85. \def\fmfcmd#1{%
  86.   \immediate\write\@outfmf{#1}\ignorespaces}
  87. {\catcode`\%=11\gdef\p@rcent{%}}
  88. \edef\fmf@fileversion{\fileversion}
  89. \def\fmffile#1{%
  90.   \def\thefmffile{#1}%
  91.   \equaltojobname{\thefmffile}{%
  92.     \errhelp={The argument of \fmffile MUST NOT be identical to the^^J%
  93.               name of your main input file!  I will use fmfdefault.mf^^J%
  94.               this time around, but you'd better fix your code now!}%
  95.     \errmessage{Invalid arument of \string\fmffile!}%
  96.     \def\thefmffile{fmfdefault}}{}%
  97.   \immediate\openout\@outfmf=\thefmffile.mp\relax
  98.   \fmfcmd{\p@rcent\space \thefmffile.mp -- do not edit, %
  99.           generated automatically by \jobname.tex^^J%
  100.           input feynmp^^J%
  101.           require_RCS_revision "\expandafter\@gobble\fmf@fileversion";}%
  102.   \setcounter{fmfchar}{0}}
  103. \let\thefmffile\relax
  104. \newcounter{fmfchar}
  105. \def\equaltojobname#1#2#3{%
  106.   \edef\@tempa{#1}%
  107.   \edef\@tempa{\meaning\@tempa}%
  108.   \edef\@tempb{\jobname}%
  109.   \edef\@tempb{\meaning\@tempb}%
  110.   \ifx\@tempa\@tempb
  111.     #2
  112.   \else
  113.     #3
  114.   \fi}
  115. \def\endfmffile{%
  116.   \fmfcmd{\p@rcent\space the end.^^J%
  117.           end.^^J%
  118.           endinput;}%
  119.   \let\thefmffile\relax
  120.   \immediate\closeout\@outfmf}
  121. {\catcode`\#=11\gdef\sh@rp{#}}
  122. \def\fmf@char#1#2{%
  123.   \ifx\thefmffile\relax
  124.     \errhelp={Outside a fmffile environment, I have no clue as to where^^J%
  125.               the METAFONT commands should go.   I will use fmfdefault.mf^^J%
  126.               for this character, but you'd better fix your code!}%
  127.     \errmessage{I detected a fmfchar environment outside of fmffile}%
  128.     \fmffile{fmfdefault}
  129.   \fi
  130.   \global\expandafter\advance\csname c@fmfchar\endcsname \@ne
  131.   \fmfcmd{beginchar(\thefmfchar, #1*\the\unitlength\sh@rp, %
  132.                                  #2*\the\unitlength\sh@rp, 0);^^J%
  133.             "feynmf: \thefmfchar";}%
  134.   \fmfcmd{LaTeX_unitlength:=\the\unitlength;}%
  135.   \fmfinit
  136.   \fmfpen{thin}}
  137. \def\fmfchar(#1,#2){%
  138.   \fmf@char{#1}{#2}%
  139.   \leavevmode
  140.   \IfFileExists{\thefmffile.\thefmfchar}%
  141.    {\includegraphics[type=eps,ext=\thefmfchar,read=\thefmfchar]%
  142.       {\thefmffile}}%
  143.    {\typeout{%
  144.       feynmp: File \thefmffile.\thefmfchar\space not found:^^J%
  145.       feynmp: Process \thefmffile.mp with MetaPost and then %
  146.               reprocess this file.}}%
  147.   \ignorespaces}
  148. \def\endfmfchar{%
  149.   \fmfposition
  150.   \fmfdraw
  151.   \fmfcmd{endchar;}}
  152. \@namedef{fmfchar*}(#1,#2){%
  153.   \begin{picture}(#1,#2)
  154.     \fmf@char{#1}{#2}%
  155.   \IfFileExists{\thefmffile.\thefmfchar}%
  156.    {\put(0,0){\includegraphics[type=eps,ext=\thefmfchar,read=\thefmfchar]%
  157.                 {\thefmffile}}}%
  158.    {\typeout{%
  159.       feynmp: File \thefmffile.\thefmfchar\space not found:^^J%
  160.       feynmp: Process \thefmffile.mp with MetaPost and then %
  161.               reprocess this file.}}%
  162.       \ignorespaces}
  163. \@namedef{endfmfchar*}{%
  164.     \endfmfchar
  165.     {\catcode`\%=14\relax
  166.       \InputIfFileExists{\thefmffile.t\thefmfchar}{}{%
  167.         \typeout{%
  168.           feynmf: Label file \thefmffile.t\thefmfchar\space not found:^^J%
  169.      feynmf: Process \thefmffile.mp with MetaPost and then %
  170.                   reprocess this file.}}}%
  171.   \end{picture}}
  172. \def\fmfframe(#1,#2)(#3,#4)#5{%
  173.   \leavevmode
  174.   \hbox{\vbox{\vskip#2\unitlength\par
  175.               \hbox{\hskip#1\unitlength#5\hskip#3\unitlength}\par
  176.               \vskip#4\unitlength}}}
  177. \def\fmfpen#1{\fmfcmd{pickup pencircle scaled #1;}}
  178. \def\fmfwizard{\fmfcmd{feynmfwizard := true;}}
  179. \def\fmfnowizard{\fmfcmd{feynmfwizard := false;}}
  180. \def\fmfshrink#1{\fmfcmd{shrink (#1);}}
  181. \def\endfmfshrink{\fmfcmd{endshrink;}}
  182. \def\fmfinit{\fmfcmd{vinit;}}
  183. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  184. \def\fmf#1#2{\fmfcmd{vconnect ("#1", #2);}}
  185. \def\fmfcyclen#1#2#3{\fmfcmd{vcyclen ("#1", #2, #3);}}
  186. \def\fmfrcyclen#1#2#3{\fmfcmd{vrcyclen ("#1", #2, #3);}}
  187. \def\fmfforce#1#2{\fmfcmd{vforce ((#1),#2);}}
  188. \def\fmfshift#1#2{\fmfcmd{vshift((#1),#2);}}
  189. \def\fmffixed#1#2{\fmfcmd{vconstraint ((#1), #2);}}
  190. \def\fmflabel#1#2{\fmfcmd{vlabel ("#1", #2);}}
  191. \def\fmfv#1#2{\fmfcmd{vvertex ("#1", #2);}}
  192. \def\fmfvn#1#2#3{\fmfcmd{vvertexn ("#1", #2, #3);}}
  193. \def\fmfblob#1#2{\fmfcmd{vblob ((#1),#2);}}
  194. \def\fmfdot#1{\fmfcmd{vdot (#1);}}
  195. \def\fmfblobn#1#2{\fmfcmd{vblobn (#1, #2);}}
  196. \def\fmfdotn#1#2{\fmfcmd{vdotn (#1, #2);}}
  197. \def\fmfleft#1{\fmfcmd{vleft(#1);}}
  198. \def\fmfright#1{\fmfcmd{vright(#1);}}
  199. \def\fmfbottom#1{\fmfcmd{vbottom(#1);}}
  200. \def\fmftop#1{\fmfcmd{vtop(#1);}}
  201. \let\fmfincoming\fmfleft
  202. \let\fmfoutgoing\fmfright
  203. \def\fmfsurround#1{\fmfcmd{vsurround(#1);}}
  204. \def\fmfleftn#1#2{\fmfcmd{vleftn(#1,#2);}}
  205. \def\fmfrightn#1#2{\fmfcmd{vrightn(#1,#2);}}
  206. \def\fmfbottomn#1#2{\fmfcmd{vbottomn(#1,#2);}}
  207. \def\fmftopn#1#2{\fmfcmd{vtopn(#1,#2);}}
  208. \let\fmfincomingn\fmfleftn
  209. \let\fmfoutgoingn\fmfrightn
  210. \def\fmfsurroundn#1#2{\fmfcmd{vsurroundn(#1,#2);}}
  211. \def\fmffor#1#2#3#4{\fmfcmd{for #1 = #2 step #3 until #4:}}
  212. \def\endfmffor{\fmfcmd{endfor}}
  213. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  214. \def\fmfposition{\fmfcmd{vposition;}}
  215. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  216. \def\fmfdraw{\fmfcmd{vdraw;}}
  217. \def\fmfL(#1,#2,#3)#4{\put(#1,#2){\makebox(0,0)[#3]{#4}}}
  218. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  219. \def\fmfdisplay{\fmfcmd{show_all_diagrams (100,100);}}
  220. \def\fmfstopdisplay{\fmfcmd{showstopping:=1;}\fmfdisplay}
  221. \mdqrestore
  222. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  223. \endinput
  224. %% 
  225. %% End of file `feynmp.sty'.
  226.